{% extends 'dash/index.html' %}
{% block 'content_show' %}
<!-- block 模块 -->
<!-- title -->
<div class="container-fluid am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
            <div class="page-header-heading">
            	<span class="am-icon-home page-header-heading-icon"></span> 
            	商品添加 
            	<small>Goods insert</small>
            </div>
        </div>
    </div>
</div>
<!-- END title -->

<!-- 添加商品信息 -->
<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-body am-fr">
            	<!-- 提交用户信息表单 -->
                <form action="{% url 'dash_add_goods' %}" class="am-form tpl-form-line-form" method="post" enctype="multipart/form-data">
                	{% csrf_token %}
                    <!-- 分类选择 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">所属分类
                            <span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9"> 
                            <select name="pid" data-am-selected="{searchBox: 1}" style="display: none;">
                                {% for v in types %}
                                    {% if v.pid == 0 %}
                                        <option disabled value="{{ v.id }}">{{ v.name }}</option>
                                    {% else %}
                                        <option value="{{ v.id }}">{{ v.name }}</option>
                                    {% endif %}

                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <!-- END分类选择 -->

                	<!-- 商品名 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">商品名
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <input name="title" type="text" class="tpl-form-input" placeholder="请输入商品名">
                        </div>
                    </div>
                    <!-- END商品名 -->

                    <!-- 生产厂家 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">生产厂家
                            <span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <input name="company" type="text" class="tpl-form-input" placeholder="请输入生产厂家">
                        </div>
                    </div>
                    <!-- END生产厂家 -->

                    <!-- 产品单价 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">产品单价
                            <span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <input name="price" type="text" class="tpl-form-input" placeholder="请输入产品单价">
                        </div>
                    </div>
                    <!-- END产品单价 -->

                    <!-- 产品库存 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">产品库存
                            <span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <input name="store" type="text" class="tpl-form-input" placeholder="请输入产品单价">
                        </div>
                    </div>
                    <!-- END产品库存 -->

                    <!-- 上传商品图片 -->
                   	<div class="am-form-group">
                        <label for="user-weibo" class="am-u-sm-3 am-form-label">上传商品图片
                        	<span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <div class="am-form-group am-form-file">
                                <div class="tpl-form-file-img">
                                    <img src="assets/img/a5.png" alt="">
                                </div>
                                <button class="am-btn am-btn-danger am-btn-sm">
									<i class="am-icon-cloud-upload"></i>
									上传商品图片
								</button>
                                <input name="goods_pic" type="file" multiple="">
                            </div>
                        </div>
                    </div>
                    <!-- END上传商品图片 -->

                    <!-- 富文本编辑器所需资源 -->
                    <link rel="stylesheet" type="text/css" href="/ueditor/UE/third-party/SyntaxHighlighter/shCoreDefault.css">
                    <script type="text/javascript" src="/ueditor/UE/third-party/SyntaxHighlighter/shCore.js"></script>
                    <script type="text/javascript" src="/ueditor/UE/ueditor.config.js"></script>
                    <script type="text/javascript" src="/ueditor/UE/ueditor.all.min.js"></script>
                    <script type="text/javascript" src="/ueditor/UE/lang/zh-cn/zh-cn.js"></script>
                    <!-- END富文本编辑器所需资源 -->

                    <!-- 产品描述 -->
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">产品描述
                            <span class="tpl-form-line-small-title">:</span>
                        </label>
                        <div class="am-u-sm-9">
                            <!-- <textarea name="desc" class="" rows="10" id="user-intro" placeholder="请输入商品描述"></textarea> -->
                            <script id="editor" style="color:red" name="desc" type="text/plain" style="height:500px;"></script>
                        </div>
                    </div>
                    <!-- END产品描述 -->

                    <!-- 富文本编辑器 -->
                    <script type="text/javascript">
                        var ue = UE.getEditor('editor');
                        SyntaxHighlighter.all();
                    </script>
                    <!-- END富文本编辑器 -->

                    <br/>
                    <!-- 提交表单按钮 -->
                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-3">
                            <button class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
                        </div>
                    </div>
                    <!-- END提交表单按钮 -->
                </form>
                <!-- END提交用户信息表单 -->
            </div>
        </div>
    </div>
</div>
<!-- END 添加商品信息 -->

<!-- END block 模块 -->
{% endblock %}